What Kafka is used for
Kafka is needed for supLink mobile to receive real-time alarms.
Installing Kafka
- Download Kafka installation package on https://wordpressfreezonex.oss-accelerate.aliyuncs.com/package/kafka_zk_install_alone.tar.
- On a server that is on the same network segment as supOS platform, copy the package to /root directory and decompress it.
tar -xvf /root/kafka_zk_install_alone.tar
- Grant permission to the installation script.
chmod +x /root/zkinstall_scripts/dispatcher.sh
- Change the IP address to the host IP and then install Kafka.
bash /root/zkinstall_scripts/dispatcher.sh your_host_IP
5. Check whether the installation is done.
source /etc/profile
jps
6. Check the robustness of Kafka process.
kill kafka_pid
- Run
jps
again after a minute, see if Kafka is restarted.
Starting supOS Service
- Access supOS installation path bin directory.
cd supOS_installation_path/bin
- Open and edit env.sh file.
vi env.sh
- Change Kafka address.
KAFKA=external_kafka_address:9012
- Save the file and update supOS.
sudo bash update-modules.sh
info
To restore supOS, access the env.sh file, change Kafka IP back and update supOS.
- Access Kafka server to check whether Kafka service is started.
cd /usr/local/kafka_2.12-1.0.2/bin
./kafka-console-consumer.sh --bootstrap-server Kafka_IP_address:9012
--topic supngin.streammodel.command
Uninstalling Kafka
- Uninstall Kafka.
bash /root/zkinstall_scripts/uninstall.sh
- Clear all data of external Kafka.
rm -rf /dam/